package com.git.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.git.domain.AjaxEntity;
import com.git.domain.StudentEntity;
import com.git.repository.StudentRepository;
import com.git.service.StudentService;
@Service
public class StudentServiceImpl implements StudentService{
	@Autowired
	private StudentRepository studentRepository;

	@Override
	public AjaxEntity add(StudentEntity studentEntity) {
		StudentEntity save = this.studentRepository.save(studentEntity);
		if (save!=null) {
			return new AjaxEntity(true, "添加成功");
		}
		return new AjaxEntity(false, "添加失败");
	}
	
}
